package com.flw.eslab.dao;

import java.io.Serializable;
import java.util.List;

import com.flw.eslab.dto.PageInfo_Dto;



public interface CommonDao<T extends Serializable> {

	
	public T save(T entity);

	
	public boolean deleteById(Class<T> clazz, Serializable id);

	
	public List<T> findByHql(String hql);

	
	public  T findById(Class<T> clazz, Serializable id);

	
	public void update(T entity);

	

	public PageInfo_Dto findByPageInfo(Class<T> clazz, Integer pageNow,
			Integer pageSize, String hql, String orderBy);

	public List<T> findTopRecordByHql(String hql, Integer howMany);

	
	public void flush();

	
	public T merge(T entity);

	
	public void saveOrUpdate(T entity);

}
